package com.webside.playbackstatistics.service.impl;

import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.webside.base.baseservice.impl.AbstractService;
import com.webside.playbackstatistics.mapper.ShareStatMapper;
import com.webside.playbackstatistics.service.ShareStatService;
import com.webside.resource.model.ResourceEntity;
@Service("ShareStatService")
public class ShareStatServiceImpl extends AbstractService<ResourceEntity, Long> implements ShareStatService {
	@Autowired
	private ShareStatMapper shareStatMapper;

	// 这句必须要加上。不然会报空指针异常，因为在实际调用的时候不是BaseMapper调用，而是具体的mapper，这里为userMapper
	@Autowired
	public void setBaseMapper() {
		super.setBaseMapper(shareStatMapper);
	}

	// 根据传入的时间和片名查询今日的的总评论数总评论数和点赞数
	@Override
	public int shareSum(Map timeAndName) {
		// TODO Auto-generated method stub
		return shareStatMapper.shareSum(timeAndName);
	}

}
